﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimulinkParser
{
	/// <summary> Location in (X,Y) format
	/// </summary>
	public class location
	{
		/// <summary> X : Row index, Y: Column index
		/// </summary>
		public int X, Y;

		/// <summary> Construct a location instance with provided X and Y
		/// </summary>
		/// <param name="X"> Row index</param>
		/// <param name="Y"> Column index</param>
		public location(int X, int Y)
		{
			this.X = X;
			this.Y = Y;
		}

		/// <summary> Construt an empty location instance
		/// <para> X = -1, Y = -1 </para>
		/// </summary>
		public location() { X = -1; Y = -1; }

		/// <summary> Output the X and Y in List&lt;int&gt; format
		/// </summary>
		public List<int> IntList { get { return new List<int>() { X, Y }; } }
	}

	/// <summary> Parameter cannot be found expection
	/// </summary>
	public class NoParameterException : ApplicationException
	{
		/// <summary> Construct a new NoParameterException instance with a message
		/// </summary>
		/// <param name="message"> Provided message </param>
		public NoParameterException(string message) : base(message) { }
		/// <summary> Construct a new NoParameterException instance with message = "Parameter cannot be found."
		/// </summary>
		public NoParameterException() : base("Parameter cannot be found.") { }
		/// <summary>  Construct a new NoParameterException instance with a message and innner exception
		/// </summary>
		/// <param name="message"> Provided message </param>
		/// <param name="innerException"> Inner exception </param>
		public NoParameterException(string message, Exception innerException) : base(message, innerException) { }
	}
}
